package com.at.c05_stack.invoke;

/**
 * 方法调用：虚方法表
 * @author huangchao E-mail:fengquan8866@163.com
 * @version 创建时间：2024/7/3 19:41
 */
interface Friendly {
    void sayHello();

    void sayGoodbye();
}
class Dog {
    public void sayHello() {

    }

    @Override
    public String toString() {
        return "Dog";
    }
}
public class Cat implements Friendly{
    public void eat() {

    }
    @Override
    public void sayHello() {

    }

    @Override
    public void sayGoodbye() {

    }

    protected void finalize() {

    }

    @Override
    public String toString() {
        return "Cat";
    }
}

class CockerSpaniel extends Dog implements Friendly {
    @Override
    public void sayHello() {
        super.sayHello();
    }

    @Override
    public void sayGoodbye() {

    }
}
